package com.yazi.mxz.common.entity.beans;

import com.myframework.smhj.hibernate.Entity;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * StoreRestockGoods entity. @author MyEclipse Persistence Tools
 */
@javax.persistence.Entity
@Table(name = "MXZ_STORE_RESTOCK_GOODS", schema = "MXZ")
public class StoreRestockGoods extends Entity implements java.io.Serializable {

	// Fields

	private StoreRestockGoodsId id;
	private StoreGoods storeGoods;
	private StoreRestock storeRestock;
	private Float restock;
	private Float prevStock;
	private Float prevSelfCost;
	private Float selfCost;
	private Integer type;
	private Boolean isChecked;

	// Constructors

	/** default constructor */
	public StoreRestockGoods() {
	}

	/** minimal constructor */
	public StoreRestockGoods(StoreRestockGoodsId id, StoreGoods storeGoods,
			StoreRestock storeRestock, Float restock, Float selfCost,
			Integer type, Boolean isChecked) {
		this.id = id;
		this.storeGoods = storeGoods;
		this.storeRestock = storeRestock;
		this.restock = restock;
		this.selfCost = selfCost;
		this.type = type;
		this.isChecked = isChecked;
	}

	/** full constructor */
	public StoreRestockGoods(StoreRestockGoodsId id, StoreGoods storeGoods,
			StoreRestock storeRestock, Float restock, Float prevStock,
			Float prevSelfCost, Float selfCost, Integer type, Boolean isChecked) {
		this.id = id;
		this.storeGoods = storeGoods;
		this.storeRestock = storeRestock;
		this.restock = restock;
		this.prevStock = prevStock;
		this.prevSelfCost = prevSelfCost;
		this.selfCost = selfCost;
		this.type = type;
		this.isChecked = isChecked;
	}

	// Property accessors
	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "restockId", column = @Column(name = "RESTOCK_ID", nullable = false, precision = 15, scale = 0)),
			@AttributeOverride(name = "storeGoodsId", column = @Column(name = "STORE_GOODS_ID", nullable = false, precision = 15, scale = 0)) })
	public StoreRestockGoodsId getId() {
		return this.id;
	}

	public void setId(StoreRestockGoodsId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STORE_GOODS_ID", nullable = false, insertable = false, updatable = false)
	public StoreGoods getStoreGoods() {
		return this.storeGoods;
	}

	public void setStoreGoods(StoreGoods storeGoods) {
		this.storeGoods = storeGoods;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "RESTOCK_ID", nullable = false, insertable = false, updatable = false)
	public StoreRestock getStoreRestock() {
		return this.storeRestock;
	}

	public void setStoreRestock(StoreRestock storeRestock) {
		this.storeRestock = storeRestock;
	}

	@Column(name = "RESTOCK", nullable = false, precision = 8, scale = 1)
	public Float getRestock() {
		return this.restock;
	}

	public void setRestock(Float restock) {
		this.restock = restock;
	}

	@Column(name = "PREV_STOCK", precision = 8, scale = 1)
	public Float getPrevStock() {
		return this.prevStock;
	}

	public void setPrevStock(Float prevStock) {
		this.prevStock = prevStock;
	}

	@Column(name = "PREV_SELF_COST", precision = 8)
	public Float getPrevSelfCost() {
		return this.prevSelfCost;
	}

	public void setPrevSelfCost(Float prevSelfCost) {
		this.prevSelfCost = prevSelfCost;
	}

	@Column(name = "SELF_COST", nullable = false, precision = 8)
	public Float getSelfCost() {
		return this.selfCost;
	}

	public void setSelfCost(Float selfCost) {
		this.selfCost = selfCost;
	}

	@Column(name = "TYPE", nullable = false, precision = 2, scale = 0)
	public Integer getType() {
		return this.type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@Column(name = "IS_CHECKED", nullable = false, precision = 1, scale = 0)
	public Boolean getIsChecked() {
		return this.isChecked;
	}

	public void setIsChecked(Boolean isChecked) {
		this.isChecked = isChecked;
	}

}